#ifndef BULLET_H
#define BULLET_H

#include <QGraphicsPixmapItem>
#include <QSoundEffect>

class Bullet : public QGraphicsPixmapItem
{

public:
    //子弹类型
    enum BulletType{
        BT_Player,//我方子弹
        BT_Enemy//敌方子弹
    };

    Bullet(QPointF _pos,QPixmap _pixmap, int _type, QPointF _speedVec);

    //移动函数
    void BulletMove();
    //播放音效
    void PlaySound();

    int type() const { return mBulletType; }

    ~Bullet(){}

protected:
    //子弹类型
    int mBulletType;
    //子弹速度
    int mBulletSpeed;

    QPointF mSpeedVec;
};

#endif // BULLET_H
